#pragma once

#include "ocs2_core/dynamics/SystemDynamicsBaseAD.h"
#include <ocs2_pinocchio_interface/PinocchioInterface.h>


using namespace ocs2;
class CartpotDynamics:public ocs2::SystemDynamicsBaseAD
{
private:
    /* data */
    std::shared_ptr<ocs2::PinocchioInterfaceCppAd> pinocchioInterfaceAdPtr_;
    CartpotDynamics(const CartpotDynamics &rhs):SystemDynamicsBaseAD(rhs){};
public:
    CartpotDynamics(const PinocchioInterface &pinocchioInterface);

    CartpotDynamics* clone() const override;

    //系统动力学微分
    ad_vector_t systemFlowMap(ad_scalar_t time,
                                const ad_vector_t &state,
                                const ad_vector_t &input,
                                const ad_vector_t &parameters) const override;

    ~CartpotDynamics()=default;
};


